<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Admin\Model;

use Think\Model;
/**
 * Description of BorrowModel
 *
 * @author Administrator
 */
class BorrowModel extends Model {
    //put your code here
    protected  $tableName = 'borrow';
    
    protected $_auto = array (
        array('ctime','time',1,'function')
    );
    
    public function getList($where=[]){
        $count = $this->where($where)->count();
        $p = getPage($count,15);
        $list = $this->where($where)->order('id desc')->limit($p->firstRow, $p->listRows)->select();
        return array('list'=>$list,'page'=>$p->show());
    }
}
